package com.wisdom.springlog.Controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 11951
 * Date: 2025-03-18
 * Time: 15:55
 */
@RestController
public class LoggerController {
    private static Logger logger= LoggerFactory.getLogger(LoggerController.class);
    @RequestMapping("/logger")
    public String logger(){
        logger.trace("=============trace===========");
        logger.debug("============debug===========");
        logger.info("==============info============");
        logger.warn("=============warn===========");
        logger.error("============error==========");

        return "打印不同级别日志";
    }
}
